configure.ac: Fix the test for compiling half-floating point code.
authorMichael Henning <drawoc@darkrefraction.com>
Sun, 3 Jan 2016 22:02:38 +0000 (17:02 -0500)
committerMichael Henning <drawoc@darkrefraction.com>
Sun, 3 Jan 2016 22:08:04 +0000 (17:08 -0500)
_mm_cvtph_ps is implicitly defined if the compiler does not support
it. So, we need to store its return value in a variable so that
the test fails to type check when the function is implicitly defined
to return an int.

configure.ac

index 28e9af0b89e616a90ee83327e6cce6b02d0aa305..e2ab5f7de6ced8f41bde064b16e65a4f2d4ce4c8 100644 (file)
@@ -390,7 +390,7 @@ if test "x$enable_mmx" = xyes; then
 
         CFLAGS="$CFLAGS $sse_flag $f16c_flag"
 
-        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <immintrin.h>],[_mm_cvtph_ps ((__m128i)_mm_setzero_ps());])],
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <immintrin.h>],[__m128 val = _mm_cvtph_ps ((__m128i)_mm_setzero_ps());])],
           AC_DEFINE(USE_F16C, 1, [Define to 1 if f16c intrinsics are available.])
           AC_MSG_RESULT(yes)
         ,